<header>
  <div class="header">
    <div class="top">
      <div class="box clearfix">
        <div class="left" > {:W('Home/top_login_state')} </div>
        <ul class="right clearfix">
          <li> <a href="{:urlrotue('Member/index')}"><i class="icon icon1"></i>我的订单</a> </li>
          <li> <a href="{:urlrotue('Member/message')}"><i class="icon icon2"></i>我的消息<span class="number" id="message_num_count">0</span></a> </li>
          <li> <a href="{:urlrotue('Member/edit')}"><i class="icon icon3"></i>我的账户</a> </li>
          <li> <a href="{:urlrotue('Cart/index')}"><i class="icon icon4"></i>购物车<span class="number"  id="cart_num_count">0</span>件</a> {:W('Home/top_cart')} </li>
        </ul>
      </div>
    </div>
    <div class="bottom">
      <div class="clearfix box">
      <div class="h_ewm">
        <div class="h_img">
  <img src="__ROOT__{$config.site_weixin}" width="70" height="70">       
</div>
    扫一扫查看手机版
    </div>
       <a class="logo" href="{:urlrotue('/')}"><img src="__ROOT__{$config.site_logo}" width="240" height="100"/> </a>
        <div class="middle">
          <div class="t1">
            <input type="text"  name="k" id="k" class="t1-input"/>
            {:W('Home/search_history')}
            <input type="submit" class="icon icon5" name="btn_top_search" id="btn_top_search"  value=""/>
          </div>
          <div class="t2">
            <volist name="hotsearch" id="item"> <a href="{$item.url|file_url_http}">{$item.title}</a> </volist>
          </div>
        </div>
      </div>
    </div>
    <div class="nav clearfix box">
      <div class="all">
        <div class="all-cell"><img src="{$theme_path}/images/icon1.png" width="25" height="25"/> 全部分类</div>
        <ul id="cell">
          <foreach name="all_cat" item="top_menu">
            <li> <a href="{:U('GList/index',array('cid'=>$top_menu['cat_id']))}"><img src="__ROOT__{$top_menu.ico}" width="25" height="25"/>{$top_menu.cat_name}</a>
              <dl class="cell">
                <volist name="top_menu['sub']" id="item">
                  <dd>
                    <h3><a href="{:U('GList/index',array('cid'=>$item['cat_id']))}">{$item.cat_name}</a></h3>
                    <div class="cell-list">
                      <volist name="item['sub']" id="vo"> <a href="{:U('GList/index',array('cid'=>$vo['cat_id']))}">{$vo.cat_name}</a> </volist>
                    </div>
                  </dd>
                </volist>
              </dl>
              <div class="right">
                <volist name="top_menu['adv_picture']" id="adv"> <a class="imgs" href="{$top_menu['adv_links'][$key]|file_url_http}"> <img src="__ROOT__{$adv}" width="200"/>
                  <div class="lans twos"> </div>
                  </a> </volist>
              </div>
            </li>
          </foreach>
        </ul>
      </div>
      <foreach name="menu_cat" item="menu_item"> <a href="{:U('GList/index',array('cid'=>$menu_item['cat_id']))}" {$top_cat_id|get_menu_current=$menu_item['cat_id'],0}>{$menu_item.cat_name}</a> </foreach>
    </div>
  </div>
</header>
<script>

    $(function () {

        //$('.header .right li:last-child').click(function(){

         //   $(this).toggleClass('ons1');

         //   $(this).children('.hover').stop(true,true).fadeToggle();

        //});

		 $('.header .right li:last-child').hover(function(){

            $(this).addClass('ons1');

            $(this).children('.hover').stop(true,true).fadeIn();

        },function(){

            $(this).removeClass('ons1');

            $(this).children('.hover').stop(true,true).hide();

		});

        $(".middle .t1").hover(function () {

            $('.searchs-cell').stop(true, true).fadeIn();

        }, function () {

            $('.searchs-cell').hide();

        });

        $("#cell").hover(function () {

            $(this).stop(true, true).fadeIn(500);

        }, function () {

            $(this).hide();

        });

        $(".all").hover(function () {

            $(this).children('ul').stop(true, true).fadeIn(500);

        }, function () {

            $(this).children('ul').hide();

        });

        $("#cell").hover(function () {

            $(this).stop(true, true).fadeIn(500);

        }, function () {

            $(this).hide();

        });



        $("#cell li").hover(function () {

            $(this).parents('#cell').addClass("on");

            $(this).children('.right').stop(true, true).fadeIn(500);

        }, function () {

            $(this).parents('#cell').removeClass("on");

            $(this).children('.right').hide();

        });





    })

</script> 
<script type="text/javascript">

    fwshop_root = "__APP__";

    var theme_path = "{$theme_path}";//主题路径

    var url_login_back = "{:U('Register/login')}?ret="+document.location;

    var url_register_back = "{:U('Register/index')}?ret="+document.location;

    var url_top_login = "{:U('Register/top_state')}";//获取用户登陆状态地址

    var url_logout_ajax =  "{:U('Register/logout_ajax')}";//用户退出登陆地址AJAX

    var url_logout =  "{:U('Register/logout')}";//用户退出登陆地址

    var url_cart = "{:U('Cart/index')}";//购物车地址

    var url_add_cart = "{:U('Cart/add_cart')}";//加入购物车地址

    var url_help = "{:U('Help/index')}";//帮助中心地址

    var url_cart_num_count = "{:U('Cart/num_count')}";//获取购物车数量地址

	 var url_msg_num_count = "{:U('Ajax/message_count')}";//获取购物车数量地址

    var url_go_index = "{:U('/')}";//首页

    var url_top_search = "{:U('GList/index')}?"; //搜索地址

    var url_verify_code = "{:U('Register/verify')}?"; //获取验证码地址

    var url_forget_email = "{:U('Register/forget_email')}?"; //找回密码确定地址

    var url_forget_reset_ajax = "{:U('Register/forget_reset_ajax')}?"; //重置密码-找回密码确定地址

    var url_login = "{:U('Register/login')}?"; //用户登陆页面地址

    var url_login_submit = "{:U('Register/login_submit')}";//用户登陆请求地址

    var url_register_submit = "{:U('Register/register_submit')}";//用户注册请求地址

    //get_top_login_state();//获取顶部登陆状态

</script>